package com.winenine999.generator.dao;

import com.winenine999.model.Purchaseordersub;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface PurchaseordersubMapper {
    @Delete({
        "delete from purchaseordersub",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    @Insert({
        "insert into purchaseordersub (id, phoid, ",
        "phid, uid, wid, ",
        "num)",
        "values (#{id,jdbcType=INTEGER}, #{phoid,jdbcType=INTEGER}, ",
        "#{phid,jdbcType=INTEGER}, #{uid,jdbcType=INTEGER}, #{wid,jdbcType=INTEGER}, ",
        "#{num,jdbcType=INTEGER})"
    })
    int insert(Purchaseordersub record);

    int insertSelective(Purchaseordersub record);

    @Select({
        "select",
        "id, phoid, phid, uid, wid, num",
        "from purchaseordersub",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ResultMap("com.winenine999.generator.dao.PurchaseordersubMapper.BaseResultMap")
    Purchaseordersub selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Purchaseordersub record);

    @Update({
        "update purchaseordersub",
        "set phoid = #{phoid,jdbcType=INTEGER},",
          "phid = #{phid,jdbcType=INTEGER},",
          "uid = #{uid,jdbcType=INTEGER},",
          "wid = #{wid,jdbcType=INTEGER},",
          "num = #{num,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Purchaseordersub record);
}